<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/WEB-INF/template/crud/edit.xhtml">
        <ui:param name="MB" value="#{movimentoController}"/>
        <ui:param name="OPERACAO" value="Editar"/>
        <ui:define name="edit">
            <div class="control-group">
                <h:outputLabel value="Conta Origem: " for="origem" styleClass="control-label"/>
                <div class="controls">
                    <h:selectOneMenu value="#{MB.selected.ctaOrigem}" id="origem" required="true" requiredMessage="Selecione a origem">
                        <f:selectItems value="#{MB.selectContaOrigem}" var="origem" itemLabel="#{origem.ctaDescricao}" itemValue="#{origem}"/>
                    </h:selectOneMenu>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Conta Destino: " for="destino" styleClass="control-label"/>
                <div class="controls">
                    <h:selectOneMenu value="#{MB.selected.ctaDestino}" id="destino" required="true" requiredMessage="Selecione o destino">
                        <f:selectItems value="#{MB.selectContaDestino}" var="destino" itemLabel="#{destino.ctaDescricao}" itemValue="#{destino}"/>
                    </h:selectOneMenu>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Data: " for="mvtData" styleClass="control-label"/>
                <div class="controls">
                    <div class="input-append date datepicker" data-date="12-02-2012">
                        <h:inputText id="mvtData" required="true" value="#{MB.selected.mvtData}" 
                                     title="Data do movimento" requiredMessage="A data do movimento é requerida">
                            <f:convertDateTime pattern="dd/MM/yyyy" type="date"/>
                        </h:inputText>
                        <span class="add-on"><i class="icon-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Valor: " for="mvtValor" styleClass="control-label"/>
                <div class="controls">
                    <h:inputText id="mvtValor" required="true" value="#{MB.selected.mvtValor}" 
                                 title="Valor do movimento" requiredMessage="O valor do movimento é requerido" styleClass="moeda">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:inputText>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Histórico: " for="mvtHistorico" styleClass="control-label"/>
                <div class="controls">
                    <h:inputText id="mvtHistorico" value="#{MB.selected.mvtHistorico}" 
                                 title="Histórico do movimento" 
                                 styleClass="input-xlarge"/>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Documento: " for="mvtDocumento" styleClass="control-label"/>
                <div class="controls">
                    <h:inputText id="mvtDocumento" value="#{MB.selected.mvtDocumento}" 
                                 title="Documento do movimento" 
                                 styleClass="input-xlarge"/>
                </div>
            </div>
            <div class="control-group">
                <h:outputLabel value="Obervação: " for="mvtObservacao" styleClass="control-label"/>
                <div class="controls">
                    <h:inputText id="mvtObservacao" value="#{MB.selected.mvtObservacao}" 
                                 title="Observação do movimento" 
                                 styleClass="input-xlarge"/>
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <h:outputLabel value="Baixado" for="mvtBaixado" styleClass="checkbox inline">
                        <h:selectBooleanCheckbox id="mvtBaixado" value="#{MB.selected.mvtBaixado}" />
                    </h:outputLabel>
                    <h:outputLabel value="Transferência" for="mvtTransferencia" styleClass="checkbox inline">
                        <h:selectBooleanCheckbox id="mvtTransferencia" value="#{MB.selected.mvtTransferencia}" />
                    </h:outputLabel>
                </div>
            </div>
        </ui:define>
    </ui:composition>
</html>
